
package com.trydofor.a9task.base.act.help;

import com.trydofor.a9task.base.act.bean.Act;
import com.trydofor.a9task.base.sys.bean.ActBeanRw;
import com.trydofor.aloe.converter.DateTime;

/**
 * @author : Shi Rongjiu (www.trydofor.com)
 * @date : Nov 30, 2012
 * @see :
 */

public class ActBeanSetter {
    
    public static void setInsAct(ActBeanRw bean, Act act) {
        if (bean == null || act == null) return;
        bean.setInsAt(DateTime.ydxYdx(act.getYmdi(), act.getHmxi()));
        bean.setInsOn(act.getId());
        bean.setInsBy(act.getUser());
    }
    
    public static void setUpdAct(ActBeanRw bean, Act act) {
        if (bean == null || act == null) return;
        bean.setUpdAt(DateTime.ydxYdx(act.getYmdi(), act.getHmxi()));
        bean.setUpdOn(act.getId());
        bean.setUpdBy(act.getUser());
    }
}
